﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;
using MySql.Data.MySqlClient;

namespace topicos2_oztech_drturin.Banco
{
    public class ConexaoDB
    {
        private string GetStringConexao()
        {
            return ConfigurationManager.ConnectionStrings["topicos2_oztech_drturinConnectionString"].ConnectionString;
        }

        public MySqlCommand ComandoSP(String sp)
        {
            MySqlConnection conn = new MySqlConnection(GetStringConexao());//ok
            MySqlCommand cmd = new MySqlCommand(sp, conn);
            cmd.CommandType = System.Data.CommandType.StoredProcedure;

            return cmd;
        }
    }
}